Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Movie Controller Actions

This section discusses new actions, which are integer constants (defined by the mcAction data type) used by movie controller components. Applications that use movie controller components can invoke these actions by calling the MCDoAction function.

This section does not describe all the existing constants documented in Inside Macintosh: QuickTime Components. The new constants are these:

enum {
    mcActionGetSelectionBegin               = 53,   /* param is TimeRecord */
    mcActionGetSelectionDuration            = 54,   /* param is TimeRecord */
    mcActionPrerollAndPlay                  = 55,   /* param is Fixed, play rate */
    mcActionGetCursorSettingEnabled         = 56,   /* param is pointer to Boolean */
    mcActionSetCursorSettingEnabled         = 57,   /* param is Boolean */
    mcActionCustomButtonClick               = 60,   /* param is pointer to */
                                                    /*   EventRecord */
    mcActionSetColorTable                   = 58,   /* param is CTabHandle */
};
typedef short mcAction;

Actions for Use by Applications

mcActionGetSelectionBegin
The parameter must contain a pointer to a time structure. The time returned is in the time scale of the movie. The returned time indicates the start time of the current user time selection.
mcActionGetSelectionDuration
The parameter must contain a pointer to a time structure. The time value returned is in the time scale of the movie. The returned time indicates the duration of the current user time selection. If there is no selection, this value is 0.
mcActionPrerollAndPlay
Your application can use this action to preroll a movie and then immediately play it. You should use this action whenever a movie controller is used and the movie needs to be played programmatically.
The parameter data must contain a fixed value that indicates the rate of play. Values greater than 0 correspond to forward rates; values less than 0 play the movie backward. A value of 0 stops the movie.
mcActionGetCursorSettingEnabled
Your application can use this action to determine whether cursor switching is enabled for a movie controller.
The parameter data must contain a pointer to a Boolean value--a value of true indicates that cursor switching is enabled. By default, this value is set to true .
mcActionSetCursorSettingEnabled
Your application can use this action to control whether the movie controller can change the cursor.
The parameter data must contain a Boolean value. Set this value to true to enable the movie controller to change the cursor. Set it to false to disable cursor switching.
Some movie controllers (QuickTime VR, for example) change the cursor while the pointer is over the movie to indicate that the pointer is over a hot spot. If you do not want the movie controller to change the cursor, you should use this action to prevent the movie controller from changing the cursor.
mcActionSetColorTable
Your application can use this action to determine when the movie controller is going to set a new color table. Setting a color table causes the window's palette to be updated to the new color table. Applications can use this action to monitor or control the movie controller's current color environment.
mcActionSetFlags
Your application can use this action to set a movie's control flags. The parameter data must contain a long integer that contains the new control flag values. An additional flag has been defined:

mcFlagsUseCustomButton
Requests a custom button in the movie controller. The appearance of this button is determined by the movie controller. In the movie controller provided with QuickTime, this button is a downward-pointing arrow, and it is recommended that other movie controllers use a downward-pointing arrow for their custom buttons. When its custom button is clicked, the movie controller generates the mcActionCustomButtonClick action. Your application responds by checking for the mcActionCustomButtonClick action in its action filter function and performing any tasks that are necessary.

Actions for Use by Action-Filter Functions

mcActionCustomButtonClick
Your application can use this action to determine when the custom button in the controller (if any) is clicked.

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |